<template>
	<view class="content">
		<view class="carp">
			<text>头像</text>
			<image src="http://puputong.huijipin.cn/uploads/20220322/b7786b244ff95787dbf8b188bc90da48.png" />
		</view>
		<view class="carp2">
			<text>昵称</text>
			<input type="text" placeholder-class='placeholderclass' value="" placeholder="请输入昵称" />
		</view>
		<view class="carp2">
			<text>姓名</text>
			<view class="" style="position: relative;">
				<input type="text" placeholder-class='placeholderclass' value="" placeholder="请输入您的姓名" />
				<!-- <image src="http://puputong.huijipin.cn/uploads/20220322/ea553f08f44ac95ef99e281d0bd95605.png" mode=""> -->
				<!-- </image> -->
			</view>
		</view>
		<view class="carp2" @click="show=true">
			<text>绑定手机号</text>
			<view class="" style="position: relative;">
				<input :disabled="true" type="text" placeholder-class='placeholderclass' value=""
					placeholder="请输入手机号" />
				<image src="http://puputong.huijipin.cn/uploads/20220322/ea553f08f44ac95ef99e281d0bd95605.png" mode="">
				</image>
			</view>
		</view>
		<view class="bx">
			保存

		</view>
		<u-popup v-model="show" mode="bottom">
			<!-- //手机号 -->
			<view class="warp">
				<view class="warp_1">
					<text @click="show=false">取消</text>
					<text @click="bd(mobile,code)">确定</text>
				</view>
				<view class="warp_2">
					<text>原手机号：</text>
					<text>17624400440</text>
				</view>
				<view class="warp_3">
					<text >新手机号：</text>
					<input
					 placeholder-class="placeholderclass" type="text" v-model="mobile" :placeholder="'请输入手机号'" />
					<text @click="yzm(mobile)" :style="{
					 	'background':!cl?'#FF1B1B':'#E1E1E1' ,
					 	'opacity': !cl?1:0.5,
					 	'color': !cl?'white':'#333333',
					 }" class="t">
						<text v-if="cl">{{number+'s'}}</text>
						获取验证码</text>
				</view>
				<view class="warp_3">
					<text>验证码：</text>
					<input placeholder-class="placeholderclass" type="text" v-model="code" placeholder="请输入验证码" />
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				mobile: '',
				code: '',
				cl: false,
				number: '',
			};
		},
		methods:{
			countdown() {
				if (this.number == 0) {
					this.cl = false,
						this.number = 60;
					return false;
				} else {
					this.number--;
				}
				setTimeout(() => {
					this.countdown();
				}, 1000);
			},
			yzm() {
				if (this.cl) {
					this.$toast(this.number + 's后点击')
					return
				}
				this.cl = true
				this.countdown()
			},
		}
		
	}
</script>

<style lang="scss" scoped>
	.bx {
		position: fixed;
		height: 80rpx;
		width: 91%;
		left: 50%;
		bottom: 30rpx;
		transform: translateX(-50%);
		text-align: center;
		line-height: 80rpx;
		background: #FF1B1B;
		border-radius: 40rpx;
		font-size: 30rpx;
		font-family: OPPOSans;
		font-weight: 500;
		color: #FFFFFF;
	}

	.content {
		padding: 30rpx;
	}

	.carp2 {
		padding-top: 30rpx;
		position: relative;

		.placeholderclass {
			font-size: 24rpx;
			font-family: OPPOSans;
			font-weight: 400;
			color: #999999;
		}

		image {
			width: 20rpx;
			height: 12rpx;
			position: absolute;
			right: 30rpx;
			top: 50%;
			transform: translateY(-50%);
		}

		text {
			display: block;
			font-size: 32rpx;
			font-family: OPPOSans;
			font-weight: 500;
			color: #333333;

		}

		input {
			margin-top: 20rpx;
			padding-left: 30rpx;
			height: 80rpx;

			background: #FFFFFF;
			border: 1px solid #E1E1E1;
			border-radius: 10rpx;
		}
	}

	.carp {
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1px solid #E1E1E1;
		padding-top: 30rpx;
		padding-bottom: 30rpx;

		text {
			font-size: 32rpx;
			font-family: OPPOSans;
			font-weight: 500;
			color: #333333;
		}

		image {
			width: 95rpx;
			height: 95rpx;
		}
	}
</style>


<style lang="scss" scoped>
	/deep/.uni-input-input {
		font-size: 26rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #999999;
	}

	.sr {
		height: 89rpx;
		background: #FFFFFF;
		padding-left: 30rpx;
		border: 1rpx solid #E1E1E1;
		display: flex;
		padding-right: 30rpx;

		input {
			margin-top: 2rpx !important;
			padding: 0 !important;
			border: none !important;
		}

	}

	.warp {
		height: 525rpx;
		background: #FFFFFF;
		padding: 30rpx;
		box-sizing: border-box;
		.warp_3 {
			margin-top: 30rpx;
			position: relative;
			width: 690rpx;
			box-sizing: border-box;
			height: 89rpx;
			background: #FFFFFF;
			padding-left: 30rpx;
			border: 1rpx solid #E1E1E1;
			display: flex;
			align-items: center;
			/deep/ .placeholderclass {
				font-size: 26rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #999999;
			}

			.t {
				position: absolute;
				right: 0rpx;
				font-size: 22rpx;
				font-family: OPPOSans;
				font-weight: 400;
				color: #333333;
				width: 170rpx;
				height: 50rpx;
				background: rgba($color: #E1E1E1, $alpha: 0.5);
				display: inline-block;
				line-height: 50rpx;
				text-align: center;
				border-radius: 8rpx;
			}
		}

		.warp_2 {
			width: 690rpx;
			margin-top: 30rpx;
			height: 89rpx;
			background: #FFFFFF;
			padding-left: 30rpx;
			border: 1rpx solid #E1E1E1;
			display: flex;
			box-sizing: border-box;

			align-items: center;

			input {}



			text:nth-of-type(1) {
				font-size: 28rpx;
				font-family: Source Han Sans CN;
				font-weight: 600;
				color: #181818;
			}

			text:nth-of-type(2) {
				margin-left: 15rpx;
				font-size: 24rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #999999;
			}

			text:nth-of-type(3) {
				font-size: 22rpx;
				font-family: OPPOSans;
				font-weight: 400;
				color: #333333;
				width: 145rpx;
				height: 50rpx;
				background: rgba($color: #E1E1E1, $alpha: 0.5);
				display: inline-block;
				line-height: 50rpx;
				text-align: center;
				border-radius: 8rpx;
			}
		}

		.warp_1 {
			display: flex;
			justify-content: space-between;

			text:nth-of-type(1) {
				font-size: 30rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #181818;
			}

			text:nth-of-type(2) {
				font-size: 30rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #FF1B1B;

			}
		}
	}

	.body {
		padding: 30rpx;

		.body_4 {
			font-size: 30rpx;
			margin-top: 30rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #FFFFFF;
			height: 80rpx;
			background: #00795E;
			border-radius: 40rpx;
			text-align: center;
			line-height: 80rpx;
		}

		.body_2 {
			padding: 30rpx 0 0rpx 0;

			.body_1_20 {
				width: 148rpx;
				height: 60rpx;
				background: #FFFFFF;
				border: 1rpx solid #00795E;
				border-radius: 30rpx;
			}

			.body_2_1 {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 25rpx;
				height: 80rpx;
				background: #FFFFFF;
				padding-left: 20rpx;
				border: 1rpx solid #E1E1E1;

				text:nth-of-type(1) {
					font-size: 24rpx;

					font-family: Source Han Sans CN;

					font-weight: 400;

					color: #999999;
				}

			}

			text:nth-of-type(1) {
				display: block;
				font-size: 32rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #181818;
			}


			/deep/ .placeholderclass {
				font-size: 24rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #999999;
			}

			input {
				margin-top: 25rpx;
				height: 80rpx;
				background: #FFFFFF;
				padding-left: 20rpx;
				border: 1rpx solid #E1E1E1;
			}
		}

		.body_1 {
			display: flex;
			padding: 30rpx 0 30rpx 0;
			min-height: 130rpx;
			// -bottom
			border-bottom: 1rpx solid #EDEDED;
			align-items: center;
			justify-content: space-between;

			text:nth-of-type(2) {
				width: 148rpx;
				height: 60rpx;
				background: #00795E;
				line-height: 60rpx;
				text-align: center;
				border-radius: 30rpx;
				font-size: 24rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #FFFFFF;
			}

			text:nth-of-type(1) {
				font-size: 32rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #181818;
			}
		}
	}
</style>
